﻿using System;

namespace LearnCSharp_1
{
    class LearnNumber
    {
        static void Main_Number(string[] args)
        {
            test_int();
            test_double();
            test_decimal();
        }

        static void test_decimal()
        {
            decimal min = decimal.MinValue;
            decimal max = decimal.MaxValue;
            Console.WriteLine($"The range of the decimal type is {min} to {max}");

            double a = 1.0;
            double b = 3.0;
            Console.WriteLine(a / b);

            decimal c = 1.0M;
            decimal d = 3.0M;
            Console.WriteLine(c / d);
            Console.ReadKey();

            double radius = 2.50;
            double area = Math.PI * radius * radius;
            Console.WriteLine(area);
            Console.ReadKey();


        }

        static void test_double()
        {
            double max = double.MaxValue;
            double min = double.MinValue;
            Console.WriteLine($"The range of double is {min} to {max}");
            Console.ReadKey();

            double third = 1.0 / 3.0;
            Console.WriteLine(third);
            Console.ReadKey();
        }

        static void test_int()
        {
            int a = 18;
            int b = 6;
            int c = a + b;
            Console.WriteLine(c);

            int max = int.MaxValue;
            int min = int.MinValue;
            Console.WriteLine($"The range of integers is {min} to {max}");

            int what = max + 3;
            Console.WriteLine($"An example of overflow: {what}");
            Console.ReadKey();
        }
    }
}
